package com.doit.demo02;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class test04_input {
    public static void main(String[] args) throws IOException {
        InputStream in = new FileInputStream("d:\\work\\abc\\1.txt");
        int len ;//得到的长度
        byte[] b = new byte[1024];//一次性可存储的数据长度
        while ((len=in.read(b))!=-1){
            System.out.print(new String(b,0,len));
        }
    }
}
